populate county options based on zip code entered

by: lukky, 9 years ago


I need to populate a dropdown list of county options based on the zip code entered by the user. I've come across https://pypi.python.org/pypi/pyzipcode and https://www.usps.com/business/web-tools-apis/welcome.htm but I'm not sure if these are overkill. Does anyone have experience with this?



You must be logged in to post. Please login or register an account.



At least at a quick glance, it does not appear to me that either of those support county requirement. pyzipcode looks to be pretty lightweight, not sure about the usps one. AFAIK, counties are really not used in shipping, so I am not sure you'll find what you want there either. Counties are more for legal purposes, so you may be better off looking there.

-Harrison 9 years ago

You must be logged in to post. Please login or register an account.


You're right. That saved a bunch of time, thanks. I think I'll start by just giving a list of all counties in the state. If the zip code and county don't match, I'll just give an error.

-lukky 9 years ago

You must be logged in to post. Please login or register an account.